Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

141
Visualizações
How can I solve "prevent touch scrolling" in SwiperJS library?

Gif to show the problem: enter image description here

 <Swiper
    className="panel-swiper"
    initialSlide={value}
    onSwiper={setSwiper}
    onSlideChange={handleSlideChanging}
    simulateTouch={false}
  >
    <SwiperSlide>Panel 0</SwiperSlide>
    <SwiperSlide>Panel 1</SwiperSlide>
    <SwiperSlide>Panel 2</SwiperSlide>
    <SwiperSlide>
      <League />
      <League />
      <League />
    </SwiperSlide>
    <SwiperSlide>Panel 4</SwiperSlide>
    <SwiperSlide>Panel 5</SwiperSlide>
    <SwiperSlide>Panel 6</SwiperSlide>
    <SwiperSlide>Panel 7</SwiperSlide>
    <SwiperSlide>Panel 8</SwiperSlide>
    <SwiperSlide>Panel 9</SwiperSlide>
  </Swiper>

As you can see when I want to use touch to scroll page, it prevented. but using mouse wheel it's working properly correct.

I need to mention, I'm using SwiperJS.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is how I solved this problem, when I imported the extra modules (A11y, Navigation, Pagination), the problem went away.

import { Swiper, SwiperSlide } from 'swiper/react';
import { A11y, Navigation, Pagination } from 'swiper';
                            

                                <Swiper
                                    modules={[Navigation, Pagination, A11y]}
                                    spaceBetween={50}
                                    slidesPerView={1}
                                    navigation
                                    pagination={{ clickable: true }}
                                >
                                    <SwiperSlide>
                                        test
                                    </SwiperSlide>
                                </Swiper>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda